import Vue from "vue";
import "normalize.css/normalize.css"; //CSS 重置的现代替代方案
import './plugins/element'
import './plugins/antd'
import "@/styles/index.scss";//全局css 
import App from "./App";
import store from "./store";
import router from "./router";
import "./icons"; // icon
import "./permission";//权限控制 
import "./utils/error-log"; // error log
import * as filters from "./filters"; //全局过滤器 
import { getMenuId } from "@/utils/menuName";
import { getTokenAndID } from "@/utils/common";
import globleModule from "./install.js";// 注册全局组件

Vue.prototype.$getMenuId = getMenuId;
Vue.prototype.$getTokenAndID = getTokenAndID;
Vue.use(globleModule)

//注册全局实用程序过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key]);
});
Vue.prototype.$bus = new Vue();
//全局实例
const bus = new Vue();
window.bus = bus;
Vue.config.productionTip = false;

new Vue({
  el: "#app",
  router,
  store,
  render: h => h(App)
});
